<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<div class="header">
	<h2>
		考核指标信息<span><font color="red">（* 为必填项）</font> </span>
	</h2>
</div>
<form:form commandName="model" cssClass="validate" id="performanceItemForm"
	action="performance/performanceItem/save">
	<form:hidden path="id" />
	<form:hidden path="perSettingId" />
	<table class=" form-table">
		<tbody>  
		    <tr>
				<td class="td1">指标名称：</td>
				<td class="td2"><form:input path="name" cssStyle="width:50%"/></td>
			</tr> 
			
			<tr>
				<td class="td1">目标说明：</td>
				<td class="td2">
				  <form:textarea path="target"/>
				</td>
			</tr> 
			
			<tr>
				<td class="td1">衡量标准：</td>
				<td class="td2">
				   <form:textarea path="referencPoint"/>
				</td>
			</tr> 
			<tr>
				<td class="td1">权重(%)：</td>
				<td class="td2"><form:input path="weight" cssClass="number"/>%</td>
			</tr> 
			<tr>
				<td class="td1">取值方式：</td>
				<td class="td2">
				    <form:radiobuttons path="computeType" items="${computeType}" onchange="checkType()"
								itemLabel="name" itemValue="code" />
				</td>
			</tr> 
			<tr id="sys_tr1">
				<td class="td1">取数公式：</td>
				<td class="td2">
				  <form:textarea path="computeSql"/>
				</td>
			</tr> 
			<tr id="sys_tr2">
				<td class="td1">目标值：</td>
				<td class="td2"><form:input path="computeTarget" cssClass="number"/></td>
			</tr>
		</tbody>
	</table>
</form:form>
 
<isperp:buttonList>
	<button class="submit nui-mainbtn" onclick="isperp.submitForm();">保存</button>
</isperp:buttonList>
<script type="text/javascript">
$(function(){
   checkType();
});

function checkType()
{
  var v=$("input[name='computeType']:checked").val();
  if(v=="系统")
  {
    $("[id^='sys_tr']").show();
  }else
  {
    $("[id^='sys_tr']").hide();
    $("#computeTarget").val(0);
  }
}
</script>


